package com.hk.model;

import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

@Data
@Entity
public class ServerInfo implements Serializable {
    private static final long serialVersionUID = 1L;
    
    @Id
    @Column(length = 15)
    private String ip;//租借服务器ip

    @Column(length = 20)
    private String password;//租借服务器密码

    @OneToOne(cascade=CascadeType.ALL)
    @JoinColumn(name="rentInfoId",foreignKey = @ForeignKey(name = "server_info_fk_rentInfoId"))
    private RentInfo rentInfo;
}
